package com.sinodata.atmp.common
{
	import com.sinodata.common.Application;
	import com.sinodata.common.MD5;
	
	import mx.controls.Alert;

	public class ConstantsAtmp
	{
		public static  var MONITOR_URL:String="http://localhost:6666/atmpsz/GateWayServlet.do";
		public static  var STATUS_LIST:String="status_list";
		public static  var DEVICE_LIST:String="device_list";
		//设备增加
		public static  var DEVICE_SAVE:String="device_save";
		
		//设备增加
		public static  var DEVICE_DEL:String="device_del";
		public static  var ATMP_DEVICE_SERVICEIMPL:String="Atmpdeviceserviceimpl";
		public static  var ATMP_DEVICE_STATUS_RETURN_TYPE_XML:String="xml";
		
		public static  var ATMP_DEVICE_STATUS_SHOW_DETIAL:String="show_status_detial";
		
		/**
		 * @author zengqun
		 * @remark atmp_device_type定义存取form的常量名
		 * @date 2012-10-16
		 * @version 1.0
		 */
		public static var  ATMP_DEVICE_TYPE_LIST:String = "device_type_list";
		
		/**
		 * @author zengqun
		 * @remark atmp_device_type:保存的常量名
		 * @date 2012-10-16
		 * @version 1.0
		 */
		public static var  ATMP_DEVICE_TYPE_SAVE:String= "device_type_save";
		
		/**
		 * @author zengqun
		 * @remark atmp_device_type:删除的常量名
		 * @date 2012-10-16
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_TYPE_DEL:String = "device_type_del";
		
		/**
		 * @author zengqun
		 * @remark atmp_device_type_children定义存取的常量名
		 * @date 2012-10-16
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_TYPE_CHILDREN_LIST:String = "device_type_children_list";
		
		/**
		 * @author zengqun
		 * @remark atmp_device_type_children:保存的常量名
		 * @date 2012-10-16
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_TYPE_CHILDREN_SAVE:String = "device_type_children_save";
		
		/**
		 * @author zengqun
		 * @remark atmp_device_type_children:删除的常量名
		 * @date 2012-10-16
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_TYPE_CHILDREN_DEL:String = "device_type_children_del";
		
		
		/**
		 * @author zengqun
		 * @remark atmp_org 定义存取的常量名
		 * @date 2012-10-18
		 * @version 1.0
		 */
		public static var ATMP_ORG_LIST:String= "atmp_org_list";
		
		/**
		 * @author zengqun
		 * @remark atmp_org:保存的常量名
		 * @date 2012-10-18
		 * @version 1.0
		 */
		public static var ATMP_ORG_SAVE:String = "atmp_org_save";
		
		/**
		 * @author zengqun
		 * @remark atmp_org:删除的常量名
		 * @date 2012-10-18
		 * @version 1.0
		 */
		public static var ATMP_ORG_DEL:String = "atmp_org_del";
		
		/**
		 * @author zengqun
		 * @remark 设置列表分页的大小
		 * @date 2012-10-20
		 * @version 1.0
		 */
		public static var PAGE_SIZE:int = 10;
		
		/**
		 * @author zengqun
		 * @remark 存取cmd的变量名
		 * @date 2012-10-20
		 * @version 1.0
		 */
		public static var ATMP_CMD_METHOD_KEY_NAME:String = "cmd";
		
		/**
		 * @author zengqun
		 * @remark 机构保存,列表的方法类名
		 * @date 2012-10-20
		 * @version 1.0
		 */
		public static var ATMP_ORG_BPM_SERVCIE_VALUE:String = "devimonitor.Atmporgserviceimpl";
		
		/**
		 * @author zengqun
		 * @remark 生成atmp_org保存界面,下拉选择parent_org的选择框
		 * @date 2012-10-21
		 * @version 1.0
		 */
		public static var ATMP_ORG_GET_ORG_LIST_FOR_COMBOX:String="get_org_list_for_combox";
		
		/**
		 * @author zengqun
		 * @remark 生成atmp_type保存界面,下拉选择parent_org的选择框
		 * @date 2012-10-21
		 * @version 1.0
		 */
		public static var ATMP_ORG_GET_DEVICE_TYPE_LIST_FOR_COMBOX:String="get_device_type_list_for_combox";
		
		/**
		 * @author zengqun
		 * @remark 如果是:机构管理,选择父机构,则不加载当前机构;如果是设备管理,则需要加载所有的机构; 参数名
		 * @date 2012-10-21
		 * @version 1.0
		 */
		public static var ATMP_ORG_LOAD_ALL_DATA_KEY:String = "query_all";
		
		/**
		 * @author zengqun
		 * @remark 生成atmp_child_type保存界面,下拉选择设备名称的选择框
		 * @date 2012-10-22
		 * @version 1.0
		 */
		public static  var ATMP_ORG_GET_DICT_DEVICE_NAME_LIST_FOR_COMBOX:String= "get_dict_device_name_list_for_combox";
		
		/***********************start 定义设备预警(指打印机,盖章机少油,少墨的情况);报停的状态(报停指超出1小时,未发送状态的)等状态**************************************************/
		/**
		 * @author zengqun
		 * @remark 定义设备预警(指打印机,盖章机少油,少墨的情况)
		 * @date 2012-9-27
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_STATUS_EARLY_WARNING:String="Warning";
		
		/**
		 * @author zengqun
		 * @remark 定义设备正常状态
		 * @date 2012-9-27
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_STATUS_INSERVICE:String="InService";
		
		/**
		 * @author zengqun
		 * @remark 定义设备暂停服务
		 * @date 2012-9-27
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_STATUS_OUTSERVICE:String="OutService";
		
		/**
		 * @author zengqun
		 * @remark 定义设备故障
		 * @date 2012-9-27
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_STATUS_DEVICEERROR:String="DeviceError";
		
		/**
		 * @author zengqun
		 * @remark 定义报停的状态(报停指超出1小时,未发送状态的)
		 * @date 2012-9-27
		 * @version 1.0
		 */
		public static var  ATMP_DEVICE_STATUS_REPORT_QUIT:String="Quit";
		
		/**
		 * @author zengqun
		 * @remark 设备更新保存时,校验IP地址惟一
		 * @date 2012-10-25
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_CHECK_IP_ADDRESS_IS_ONLY_ONE:String = "check_ip_is_only_one";
		
		/**
		 * @author zengqun
		 * @remark 设备监控,显示交易汇总
		 * @date 2012-11-6
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_STATUS_SHOW_TRADE_TOTAL:String = "show_trade_total";
		
		/**
		 * @author zengqun
		 * @remark 设备监控,联查交易记录,执行导出功能
		 * @date 2012-11-14
		 * @version 1.0
		 */
		public static var ATMP_DEVICE_TRADE_EXPORT:String = "export_trade_list";
		
		//对sign属性进行整理
		public static function dataResolve(obj:Object):Object{
			var array:Array = new Array();
			for(var sKey:String in obj){
				if(sKey == "image1" || sKey == "image2" ||sKey == "image3" ||sKey == "image4"){
					continue;
				}
				array.push(sKey);
			}
			array.sort();
			var s:String = "";
			for(var i:int = 0; i < array.length; i++){
				if(obj[array[i]] == null){
					continue;
				}
				s = s + array[i].toString().toLowerCase() + "=" + obj[array[i]] + "&";
			}
			//Alert.show("=====s====="+s + Application.getInstance().sign);
			//			trace("=====s====="+s + Application.getInstance().sign);
			var md5:MD5 = new MD5();
			var url:String=s ;//+ Application.getInstance().sign;
			obj.s = md5.getMD5(url+Application.getInstance().sign);
			obj.url=url;
			return obj;
		}
		public function ConstantsAtmp(){
		}
	}
}